<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>

    </style>
</head>
<body>
<canvas id="can" width="400px" height="400px">

</canvas>
</body>
</html>
<script>
    var cn=document.getElementById("can");
    var can=cn.getContext("2d");
    can.strokeStyle="red"
    can.strokeRect(20,20,100,100);

</script>